home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / mathstud.zip / ANGLE.M < prev    next >
Text File  |  1993-03-10  |  224b  |  10 lines

  1. function y = angle(expr)
  2. % y=angle(x)
  3. % x - input argument (usually complex)
  4. % y - phase angle, in radians, of x
  5.  
  6. if (nargin ~= 1)
  7.     error('angle() takes only one argument')
  8. end
  9. y = atan2(imag(expr), real(expr));
  10.